(function(){
	mui("body").on('tap', '.newLink', function(){	
		if (this.href !== null){	
			mui.openWindow({url: this.href})
		}
	});

	mui("body").on('tap', '.open-nav', function(){	
		mui('.close-nav').each(function(){
			var className = this.getAttribute('class').replace('mui-active','');
			this.setAttribute('class', className);
		});	

		if (this.getAttribute('data-toggle') !== null){
			mui(this.getAttribute('data-toggle'))[0].style.display='block';
		}
	});
	mui("body").on('tap', '.close-nav', function(){	
	
		mui('.navs').each(function(){
			this.style.display='none';
		})
	});


})();